from flask import Blueprint

from .user_controller import UserController

user_blueprint = Blueprint('user', __name__)
user_controller = UserController()

# 路由映射
user_blueprint.add_url_rule(
    '/test', view_func=user_controller.test, methods=['GET'])
user_blueprint.add_url_rule(
    '/getUserById', view_func=user_controller.get_user_by_id, methods=['POST'])
user_blueprint.add_url_rule(
    '/login', view_func=user_controller.login, methods=['POST'])
user_blueprint.add_url_rule(
    '/getAllUsersByIdList', view_func=user_controller.get_all_users_by_id_list, methods=['POST'])
user_blueprint.add_url_rule(
    '/updateUserByUserId', view_func=user_controller.update_user_by_user_id, methods=['POST'])